#include <string.h>


void reverse(char* str)
{
  int i = 0;
  int j = strlen(str) - 1;
  char tmp;
  for(;i<j;++i,--j) {
    tmp = str[i];
    str[i] = str[j];
    str[j] = tmp;
  }
}

int main()
{
  char str[] = "abcdefg";
  reverse(str);
  return 0;
}
